package com.common.help.test01;

import org.elasticsearch.action.OriginalIndices;

import com.common.help.test01.impl.GoldVip;
import com.common.help.test01.impl.Orgnic;
import com.common.help.test01.impl.SuperVip;
import com.common.help.test01.impl.Vip;

public class CalPriceFactory {

	private CalPriceFactory(){
		
	}
	
	public static CalPrice factoryPrice(Player player){
		CalPrice calPrice = null;
		if(player.getTotalAmount()>30000D){
			calPrice = new GoldVip();
		}else if(player.getTotalAmount()>20000D){
			calPrice = new SuperVip();
		}else if(player.getTotalAmount()>10000D){
			calPrice = new Vip();
		}else{
			calPrice = new Orgnic();
		}
		return calPrice;
	}
}
